﻿using System;

namespace PluginSample2.BarModel
{
	internal class BarSourceItem
	{
		#region Properties

		public DateTime Time { get; private set; }
		public bool IsInMaxMinMode { get; private set; }
		public decimal? Value { get; private set; }
		public decimal? MaxValue { get; private set; }
		public decimal? MinValue { get; private set; }

		#endregion

		#region Public Methods

		public BarSourceItem(DateTime time, decimal value)
		{
			this.Time = time;
			this.Value = value;
		}

		public BarSourceItem(DateTime time, decimal maxValue, decimal minValue)
		{
			this.Time = time;
			this.MaxValue = maxValue;
			this.MinValue = minValue;
			this.IsInMaxMinMode = true;
		}

		#endregion
	}
}
